home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 398 b | 28 lines | [TEXT/CWIE] |
- // ContextUser.cp
-
- #ifndef ContextUser_h
- #include "ContextUser.h"
- #endif
- #ifndef Assert_h
- #include "Assert.h"
- #endif
-
- ContextUser::ContextUser()
- : context( Context::Current() )
- {
- if ( context != 0 )
- {
- Assert( context->users < maxuint32 );
- context->users++;
- }
- }
-
- ContextUser::~ContextUser()
- {
- if ( context != 0 )
- {
- Assert( context->users > 0 );
- context->users--;
- }
- }
-